<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%
String path = request.getContextPath();
pageContext.setAttribute("APP_PATH",path);
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
    <link href="${APP_PATH}/static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="${APP_PATH}/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${APP_PATH}/static/js/jquery-3.3.1.min.js"></script>
<head>
 <script type="text/javascript">
 	function reset_fun(){
 		alert("reset!")
 		var str=$('#storageform').serialize();
	  	$.ajax({
	  		url:"${APP_PATH}/addgoodss",
	  		data:"11",
	  		contentType: "application/x-www-form-urlencoded; charset=utf-8",  
	  		type:"POST",
	  		success:function(result){
			  	alert(str);
	  		}
	  	});
 	};
 </script>
<title>Insert title here</title>
  <style>
    .headercolor { 
      background-color: #99d9ea; }
  </style>
  </head>
  <body class="headercolor">
    <h1><p class="text-center">新增商品</p></h1>
	<br/>
	<br/>
    
      <div class="form-group">
        <ul id=nav class="nav nav-pills" onclick="reloadedpage()">
  		  <li id="h" role="presentation" class="active"><a href="#">新增商品</a></li>
		  <li id="p" role="presentation"><a href="">商品入库</a></li>
		  <li id="m" role="presentation"><a href="#">查看库存</a></li>
		</ul>
	  </div>
	  <form id="storageform" class="form-horizontal" method="POST" action="addgoodss">
	  <div class="form-group">
	  	<label for="inputTitle" class="col-sm-3 control-label">商品名称：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="inputTitle" name="title1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="goodsCode" class="col-sm-3 control-label">商品编号：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="goodsCode" name="goodsCode1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="categoryId" class="col-sm-3 control-label">商品类别：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="categoryId" name="categoryId1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="status" class="col-sm-3 control-label">商品状态：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="status" name="status1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="detail" class="col-sm-3 control-label">商品描述：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="detail" name="detail1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="unit" class="col-sm-3 control-label">销售单位：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="unit" name="unit1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="spec" class="col-sm-3 control-label">商品规格：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="spec" name="spec1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="stockNum" class="col-sm-3 control-label">商品库存：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="stockNum" name="stockNum1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="buyPrice" class="col-sm-3 control-label">商品进价：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="buyPrice" name="buyPrice1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="salePrice" class="col-sm-3 control-label">商品售价：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="salePrice" name="salePrice1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
	  	<label for="tradePrice" class="col-sm-3 control-label">商品批发价：</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="tradePrice" name="tradePrice1" maxlength="16">
        </div>
	  </div>
	  <div class="form-group">
    	<p class="text-center">
     	  <button id="btn_submit" type="submit"  class="btn btn-info btn-lg">提交</button>
    	  <button id="btn_reset" type="button"  class="btn btn-info btn-lg" onclick="reset_fun()">重置</button>
    	</p>
  	  </div>
    </form>
  </body>
</html>